package org.groovymud.shell.security.loginsteps;

import java.io.IOException;

import javax.security.auth.callback.UnsupportedCallbackException;
import javax.security.auth.login.FailedLoginException;

import org.groovymud.shell.security.MudLoginModuleData;
import org.springframework.beans.factory.annotation.Autowired;

public abstract class LoginStep {

    private LoginStepManager loginStepManager;

    public abstract void execute(MudLoginModuleData data) throws IOException, UnsupportedCallbackException, FailedLoginException;

    public LoginStep getNextStep() {
    return loginStepManager.getNextStep(this);
}

    public LoginStep getPreviousStep() {
    return loginStepManager.getPreviousStep(this);
}

    /**
     * @return the firstStep
     */
    public LoginStep getFirstStep() {
    return loginStepManager.getFirstStep();
}

    public LoginStepManager getLoginStepManager() {
        return loginStepManager;
    }

    public void setLoginStepManager(LoginStepManager loginStepManager) {
        this.loginStepManager = loginStepManager;
    }
}
